import json
import requests


def get_wxCode_token():
    params = {
        'appid': 'wx2e91c008e2619eee',
        'secret': '658feb5365456948f2e1b8167e0688e5',
        'grant_type': 'client_credential',
    }
    url = 'https://api.weixin.qq.com/cgi-bin/token'
    data = requests.get(url, params)
    token = data.json()
    # token = json.loads(data)
    return token['access_token']